"""
在一个字符串(1<=字符串长度<=10000，全部由字母组成)中找到第一个只出现一次的字符,并返回它的位置

"""

def FirstNotRepeatingChar(s):
    # write code here
    if s=='':
        return -1
    char_map = {}
    for char in s:
        if char not in char_map.keys():
            char_map[char] = 1
        else:
            char_map[char] = char_map[char]+1
    for char,index in zip(s,range(len(s))):
        if char_map[char] == 1:
            return index


print(FirstNotRepeatingChar('hhjjdkjkladfj'))